
<div class="layuimini-container">
    <form id="app-form" class="layui-form layuimini-form">
    <div class="layui-form-item">
        <label class="layui-form-label">分类ID</label>
        <div class="layui-input-block">
            <input type="text" name="category_id" lay-verify="required" lay-reqtext="分类ID不能为空" value="" class="layui-input field-category_id">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">资讯标题</label>
        <div class="layui-input-block">
            <input type="text" name="title" lay-verify="required" lay-reqtext="资讯标题不能为空" value="" class="layui-input field-title">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">资讯摘要</label>
        <div class="layui-input-block">
            <input type="text" name="summary" lay-verify="required" lay-reqtext="资讯摘要不能为空" value="" class="layui-input field-summary">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">作者</label>
        <div class="layui-input-block">
            <input type="text" name="author" lay-verify="required" lay-reqtext="作者不能为空" value="" class="layui-input field-author">
        </div>
    </div>

	<div class="layui-form-item">
            <label class="layui-form-label required">上传图片</label>
            <div class="layui-input-block layuimini-upload">
                <input name="image" class="field-image layui-input layui-col-xs6" lay-verify="required" lay-reqtext="请上传图片" placeholder="图片链地址" value="">
                <div class="layuimini-upload-btn">
                    <span><a class="layui-btn" data-upload="image" data-upload-number="one" data-upload-exts="png|jpg|jpeg" data-upload-icon="image"><i class="fa fa-upload"></i> 上传</a></span>
                    <span><a class="layui-btn layui-btn-normal" id="image" data-upload-select="image" data-upload-number="one" data-upload-mimetype="image/*"><i class="fa fa-list"></i> 选择</a></span>
                </div>
            </div>
        </div>

    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">资讯内容</label>
        <div class="layui-input-block">
            <textarea name="content" placeholder="请输入内容" class="layui-textarea field-content"></textarea>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">排序：</label>
        <div class="layui-input-inline">
            <input type="number" name="sort" value="1" class="layui-input field-sort">
        </div>
        <div class="layui-form-mid layui-word-aux">1~99</div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">是否置顶</label>
        <div class="layui-input-block">
            <input type="radio" name="is_top" value="1"  title="置顶" class="field-is_top" checked>
            <input type="radio" name="is_top" value="0"  title="不置顶" class="field-is_top">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">喜欢</label>
        <div class="layui-input-inline">
            <input type="text" name="like" value="0" class="layui-input field-like">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">浏览</label>
        <div class="layui-input-inline">
            <input type="text" name="views" value="0" class="layui-input field-views">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">评论数</label>
        <div class="layui-input-inline">
            <input type="text" name="comments" value="0" class="layui-input field-comments">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">状态</label>
        <div class="layui-input-block">
            <input type="radio" name="status" value="1"  title="启用" class="field-status" checked>
            <input type="radio" name="status" value="0"  title="禁用" class="field-status">
        </div>
    </div>

    <input type="hidden" class="field-id" name="id">

    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBtn">确认保存</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
    </form>
</div>

<script>
    

    layui.use(['form','jquery', 'layer', 'func'], function () {
        var form = layui.form,
            layer = layui.layer,
            $ = layui.jquery;

        layui.func.assign({:json_encode($data)});   // 解析数据
    });
</script>
</body>
</html>